package com.xoa.service.workflow.reportSettings;

import com.xoa.model.workflow.FlowFormType;
import com.xoa.model.workflow.FlowReport;
import com.xoa.model.workflow.FlowReportPriv;
import com.xoa.model.workflow.FlowSort;
import com.xoa.util.ToJson;

import javax.servlet.http.HttpServletResponse;

/**
 * 报表设置service层
 * 王禹萌
 * 2018-07-30
 */
public interface FlowReportService {
    // ------wym
    //报表设置查询
    public ToJson<FlowReport> queryReportSettings(String flowId, String rName, Integer page, Integer pageSize, Boolean useFlag);
    //报表设置删除
    public ToJson<FlowReport> deleteReportSettings(Integer rId);
    //报表设置编辑查询
    public ToJson<FlowReport> queryIdReportSettings(Integer rId);
    //报表设置编辑
    public ToJson<FlowReport> updateReportSettings(Integer rId,Integer tid, String flowId, String rName, String[] listItem, String[] queryItem, String createUser, String groupType, String groupField,String formId);
    //根据流程Id查询对应表单名称
    public ToJson<FlowFormType>querybyFlowIdField(String flowId);
    //新增报表权限
    public ToJson<FlowReportPriv> newReportPermission(String rId, String userStr, String deptStr);
    //修改报表权限
    public ToJson<FlowReportPriv> updateReportPermission(String rId,String pId ,String userStr, String deptStr);
    //删除报表权限
    public ToJson<FlowReportPriv> deleteReportPermission(String id,String rId);
   //按照报表Id查询该报表的所有权限
    public ToJson<FlowReportPriv> queryReportPermission(String rId);
    //按照报表Id与权限Id查询对应数据回显到编辑栏中
    public ToJson<FlowReportPriv> selectReportPermission(String rId,String id);
    //新建报表设置
    public ToJson<FlowReport> newReportSettings(Integer tid, String flowId, String rName, String[] listItem, String[] queryItem, String createUser, String groupType, String groupField,String formId);

    //获取此用户的报表数据
    public ToJson<FlowSort> getReportList(String userId);

    //根据主键rid获取一个报表信息
    public ToJson<FlowReport> getReportById(Integer rid);

    //多条件查询
    public ToJson queryReport(String flowId,
                              String beginTime,
                              String endTime,
                              String deptIds,
                              String userPrivs,
                              Integer rid,
                              String definds,
                              Integer type,
                              HttpServletResponse response);

}